﻿#region Styx Namespaces
using Styx;
using Styx.Common;
using Styx.CommonBot;
using Styx.CommonBot.Routines;
using Styx.TreeSharp;
using Styx.WoWInternals;
using Styx.WoWInternals.DBC;
using Styx.WoWInternals.WoWObjects;
using Styx.MemoryManagement;
#endregion

namespace GiwinMonk
{
    public partial class Monk : CombatRoutine
    {
        public bool CanCast(string SpellName)
        {
            ///<summary>
            /// CanCast, !Cooldown, !GlobalCooldown, HasSpell
            ///</summary>

            return SpellManager.CanCast(SpellName) &&
                   !SpellManager.Spells[SpellName].Cooldown &&
                   !SpellManager.GlobalCooldown &&
                   !StyxWoW.Me.IsCasting &&
                   !StyxWoW.Me.IsChanneling &&
                   SpellManager.HasSpell(SpellName);
        }
    }
}
